<?php
session_start();
ob_clean();
ob_start();
define('ROOT', $_SERVER['DOCUMENT_ROOT']);
define('DOMAIN', 'http://'.$_SERVER['HTTP_HOST']);
define('TEMPLATE_PATH', '/home/');
define('PATH_IMAGE_THEME', '/themes/img/');
define('services_img', '/pictures/services/');
define('cat_img', '/pictures/categories_multi/');
define('news_img', '/pictures/news/');
define('slides_img', '/pictures/slides/');
define('forms_img', '/pictures/forms/');
define('faqs_img', '/pictures/faqs/');
define('page_img', '/pictures/page_static/');
define('partner_img', '/pictures/partner/');
define('noavt', '/pictures/avatar/noavt.png');
define('noimg', '/pictures/no.jpg');
define('FACEBOOK_ADMIN', '100004609203263');
define('FACEBOOK_APP', '707486842630166');
require_once("initsession.php");
require_once(ROOT."/config/config_db.php");
require_once(ROOT."/classes/database.php");
require_once(ROOT."/classes/data_func.php");
require_once(ROOT."/classes/rewrite.php");
require_once(ROOT."/classes/generate_form.php");
require_once(ROOT."/classes/user.php");
require_once(ROOT."/classes/upload.php");
require_once(ROOT.'/classes/generate_form.php');
require_once(ROOT.'/functions/form.php');
require_once(ROOT."/functions/functions.php");
require_once(ROOT."/functions/access_function.php");
require_once(ROOT."/functions/form.php");
require_once(ROOT."/functions/rewrite_function.php");
require_once(ROOT."/functions/date_functions.php");
require_once(ROOT."/functions/file_functions.php");
require_once(ROOT."/functions/pagebreak.php");

function _loadMod($router){
    $router = strtolower($router);
    if(file_exists(ROOT.'/home/model/'.$router.'.php'))
        require_once ROOT.'/home/model/'.$router.'.php';
}
function _loadClass($router){
    $router = strtolower($router);
    if(file_exists(ROOT.'/classes/'.$router.'.class.php'))
        require_once ROOT.'/classes/'.$router.'.class.php';
}
spl_autoload_register('_loadMod');
spl_autoload_register('_loadClass');

$general = new General();
$google_analytics = "<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-46828537-1', 'sudo.vn');
  ga('send', 'pageview');

</script>";
?>